home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / DELPHI32 / GRAPHICS / IMGLIB95 / UTOOLBAR.PA_ / UTOOLBAR.PA
Text File  |  1996-03-31  |  5KB  |  171 lines

  1. {
  2. Written by Jan Dekkers and Kevin Adams (c) 1995, 1996. If you are a non
  3. registered client, you may use or alter this demo only for evaluation
  4. purposes.
  5.  
  6. Copyright by SkyLine Tools. All rights reserved.
  7.  
  8. Part of Imagelib VCL/DLL Library.
  9. }
  10.  
  11. unit utoolbar;
  12.  
  13. {Includes settings to compile in either 16 or 32 bit}
  14. {$I DEFILIB.INC}
  15.  
  16. interface
  17.  
  18. uses
  19. {$IFDEF DEL32}
  20.   Windows,
  21. {$ELSE}
  22.   WinTypes,
  23.   WinProcs,
  24. {$ENDIF}
  25.   DLL95V1,    {ImageLib Dll interface and misc. functions}
  26.   Messages,
  27.   SysUtils,
  28.   Classes,
  29.   Graphics,
  30.   Controls,
  31.   Forms,
  32.   Dialogs,
  33.   StdCtrls,
  34.   ExtCtrls,
  35.   Spin,
  36.   IToolB,     {PMultiImage Toolbar VCL component}
  37.   TMultiP;    {PMultiImage VCL component}
  38.  
  39. type
  40.   TBForm1 = class(TForm)
  41.     PMultiImage1: TPMultiImage;
  42.     Label1: TLabel;
  43.     CheckBox1: TCheckBox;
  44.     CheckBox2: TCheckBox;
  45.     CheckBox3: TCheckBox;
  46.     CheckBox4: TCheckBox;
  47.     CheckBox5: TCheckBox;
  48.     CheckBox6: TCheckBox;
  49.     CheckBox7: TCheckBox;
  50.     CheckBox8: TCheckBox;
  51.     CheckBox9: TCheckBox;
  52.     CheckBox10: TCheckBox;
  53.     CheckBox11: TCheckBox;
  54.     CheckBox12: TCheckBox;
  55.     CheckBox13: TCheckBox;
  56.     Bevel1: TBevel;
  57.     Label2: TLabel;
  58.     CheckBox14: TCheckBox;
  59.     CheckBox15: TCheckBox;
  60.     CheckBox17: TCheckBox;
  61.     CheckBox18: TCheckBox;
  62.     CheckBox19: TCheckBox;
  63.     ImageToolBar1: TMImageToolBar;
  64.     SpinEdit1: TSpinEdit;
  65.     SpinEdit2: TSpinEdit;
  66.     Label3: TLabel;
  67.     Label4: TLabel;
  68.     CheckBox16: TCheckBox;
  69.     procedure CheckBox1Click(Sender: TObject);
  70.     procedure FormActivate(Sender: TObject);
  71.     procedure CheckBox17Click(Sender: TObject);
  72.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  73.     procedure SpinEdit1Change(Sender: TObject);
  74.     procedure SpinEdit2Change(Sender: TObject);
  75.     procedure FormCreate(Sender: TObject);
  76.   private
  77.     { Private declarations }
  78.   public
  79.     { Public declarations }
  80.   end;
  81.  
  82. var
  83.   BForm1: TBForm1;
  84.  
  85. implementation
  86.  
  87. {$R *.DFM}
  88. {------------------------------------------------------------------------}
  89.  
  90. procedure TBForm1.CheckBox1Click(Sender: TObject);
  91. begin
  92.    {Show or hide toolbar button}
  93.    ImageToolBar1.tbScanImage:=CheckBox18.Checked;
  94.    ImageToolBar1.tbScanSelect:=CheckBox16.Checked;
  95.    ImageToolBar1.tbColorPalette:=CheckBox19.Checked;
  96.    ImageToolBar1.tbImageOpen:=CheckBox1.Checked;
  97.    ImageToolBar1.tbImageSave:=CheckBox2.Checked;
  98.    ImageToolBar1.tbCutImage:=CheckBox3.Checked;
  99.    ImageToolBar1.tbCopyImage:=CheckBox4.Checked;
  100.    ImageToolBar1.tbPasteImage:=CheckBox5.Checked;
  101.    ImageToolBar1.tbZoomInImage:=CheckBox6.Checked;
  102.    ImageToolBar1.tbPrintImage:=CheckBox13.Checked;
  103.    ImageToolBar1.tbStretchImageratio:=CheckBox12.Checked;
  104.    ImageToolBar1.tbStretchImage:=CheckBox11.Checked;
  105.    ImageToolBar1.tbResetImage:=CheckBox10.Checked;
  106.    ImageToolBar1.tbFlipImage:=CheckBox9.Checked;
  107.    ImageToolBar1.tbRotateImage:=CheckBox8.Checked;
  108.    ImageToolBar1.tbZoomOutImage:=CheckBox7.Checked;
  109.    ImageToolBar1.tbScrollMessage:=CheckBox14.Checked;
  110.    ImageToolBar1.tbCreditMessage:=CheckBox15.Checked;
  111. end;
  112. {------------------------------------------------------------------------}
  113.  
  114. procedure TBForm1.FormActivate(Sender: TObject);
  115. begin
  116.    CheckBox13.Checked:=ImageToolBar1.tbPrintImage;
  117.    CheckBox12.Checked:=ImageToolBar1.tbStretchImageratio;
  118.    CheckBox11.Checked:=ImageToolBar1.tbStretchImage;
  119.    CheckBox10.Checked:=ImageToolBar1.tbResetImage;
  120.    CheckBox9.Checked:=ImageToolBar1.tbFlipImage;
  121.    CheckBox8.Checked:=ImageToolBar1.tbRotateImage;
  122.    CheckBox7.Checked:=ImageToolBar1.tbZoomOutImage;
  123.    CheckBox6.Checked:=ImageToolBar1.tbZoomInImage;
  124.    CheckBox5.Checked:=ImageToolBar1.tbPasteImage;
  125.    CheckBox4.Checked:=ImageToolBar1.tbCopyImage;
  126.    CheckBox3.Checked:=ImageToolBar1.tbCutImage;
  127.    CheckBox2.Checked:=ImageToolBar1.tbImageSave;
  128.    CheckBox1.Checked:=ImageToolBar1.tbImageOpen;
  129.    CheckBox14.Checked:=ImageToolBar1.tbScrollMessage;
  130.    CheckBox15.Checked:=ImageToolBar1.tbCreditMessage;
  131. end;
  132. {------------------------------------------------------------------------}
  133.  
  134. procedure TBForm1.CheckBox17Click(Sender: TObject);
  135. begin
  136.    ImageToolBar1.ShowToolbar:=CheckBox17.Checked;
  137. end;
  138. {------------------------------------------------------------------------}
  139.  
  140. procedure TBForm1.FormClose(Sender: TObject; var Action: TCloseAction);
  141. begin
  142.      BForm1:=Nil;
  143.      Action:=caFree;
  144. end;
  145. {------------------------------------------------------------------------}
  146.  
  147. procedure TBForm1.SpinEdit1Change(Sender: TObject);
  148. begin
  149.    ImageToolBar1.tbTop:=SpinEdit1.Value;
  150. end;
  151. {------------------------------------------------------------------------}
  152.  
  153. procedure TBForm1.SpinEdit2Change(Sender: TObject);
  154. begin
  155.    ImageToolBar1.tbLeft:=SpinEdit2.Value;
  156. end;
  157. {------------------------------------------------------------------------}
  158.  
  159. procedure TBForm1.FormCreate(Sender: TObject);
  160. begin
  161.     ImageToolBar1.PreviewsDir:=ExtractFilePath(Application.Exename);
  162. end;
  163.  
  164. end.
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.